> Defined in Type: ReactiveViewReactiveList.Reactive.Views Assembly: ReactiveList.Reactive.dll
Applies to
net11.0, net10.0, net47, net471, net472, net48, net481
public ReactiveView(IObservable<CacheNotify<T>> stream, IEnumerable<T> snapshot, Func<T, bool> filter, in TimeSpan throttle, IScheduler scheduler)
View source (opens in a new tab)
Summary: Initializes a new instance of the ReactiveView class from a notification stream and an initial snapshot.
Parameters
| Name | Type | Description |
|---|---|---|
stream | IObservable | An observable sequence of cache notifications to monitor for changes. Cannot be null. |
snapshot | IEnumerable | An optional initial collection of items to populate the view before processing the stream. Only items matching the filter are included. |
filter | Func | A predicate used to determine which items from the snapshot and stream are included in the view. Cannot be null. |
in throttle | TimeSpan (opens in a new tab) | The time interval used to batch incoming notifications from the stream before processing. |
scheduler | IScheduler | The scheduler on which to observe and process batched notifications, typically used to marshal updates to the appropriate thread (such as the UI thread). |
Remarks
Changes that land between taking the snapshot and subscribing are not seen, because a bare stream cannot be rebuilt. Use a constructor that takes the source when that matters.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException (opens in a new tab) | Thrown if stream or filter is null. |